# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=xss-freak
pkgver=17.e361766
pkgrel=8
pkgdesc='An XSS scanner fully written in Python3 from scratch.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner' 'blackarch-fuzzer')
arch=('any')
url='https://github.com/hacker900123/XSS-Freak'
license=('custom:unknown')
depends=('python' 'python-colorama' 'python-beautifulsoup4' 'python-requests'
         'python-user-agent' 'python-asciistuff')
makedepends=('git')
source=("$pkgname::git+https://github.com/hacker900123/XSS-Freak.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/python3' XSS-Freak.py
}

package() {
  cd $pkgname

  install -Dm 755 XSS-Freak.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

